﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="type.aspx.cs" Inherits="HPIT_Library.type" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" />
    <link rel="stylesheet" href="css/Site.css" />
    <link rel="stylesheet" href="css/zy.all.css" />
    <link rel="stylesheet" href="css/font-awesome.min.css" />
    <link rel="stylesheet" href="css/amazeui.min.css" />
    <link rel="stylesheet" href="css/admin.css" />
    <script src="js/jquery-1.7.2.min.js"></script>
    <script>
        $(function () {
            $(".btn_Dete").click(function () {
                if (confirm("您确定要删除吗？")) {
                    var id = $(this).attr("dete");
                    $.post("/LoginAjax.ashx", { Acount: "delete", Pid: id }, function (data) {
                        if (data.State == 1) {
                            location.reload();
                        } else {
                            confirm(data.Message);
                        }
                    }, "json")
                }
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="dvcontent">

            <div>
                <!--tab start-->
                <div class="tabs">
                    <div class="hd">
                        <ul style="">
                            <li style="box-sizing: initial; -webkit-box-sizing: initial;" class="on">查看分类</li>
                            <li class="" style="box-sizing: initial; -webkit-box-sizing: initial;"><a href="TypeAdd.aspx">添加分类</a></li>
                        </ul>
                    </div>
                    <div class="bd">
                        <ul style="display: block; padding: 20px;">
                            <li>
                                <!--分页显示角色信息 start-->
                                <div id="dv1" style="text-align: center">
                                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryId" OnRowCommand="GridView1_RowCommand" Width="100%">
                                        <Columns>
                                            <asp:BoundField DataField="CategoryId" HeaderText="类别ID" InsertVisible="False" ReadOnly="True" SortExpression="CategoryId" />
                                            <asp:BoundField DataField="CategoryName" HeaderText="类别名称" SortExpression="CategoryName" />
                                            <asp:TemplateField HeaderText="操作">
                                                <ItemTemplate>
                                                    <a href="JAVASCIPT:;" class="btn_Dete" dete='<%# Eval("CategoryId") %>'>Ajax删除</a>
                                                    <asp:Button ID="Button2" runat="server" Text="删除" CommandArgument='<%# Eval("CategoryId") %>' CommandName="mydelete" OnClientClick="return confirm('是否删除？')" />
                                                    <asp:Button ID="Button1" runat="server" Text="添加分类" PostBackUrl="~/TypeAdd.aspx" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>

                                </div>
                                <!--分页显示角色信息 end-->
                            </li>
                        </ul>
                        <ul class="theme-popbod dform" style="display: none;">
                            <div class="am-cf admin-main" style="padding-top: 0px;">
                                <!-- content start -->

                                <div class="am-cf admin-main" style="padding-top: 0px;">
                                </div>
                                <!-- end-->
                        </ul>
                    </div>
                </div>
                <!--tab end-->
            </div>
        </div>
    </form>
</body>
</html>
